/*
 * @Description: 组织结构、组织人员-接口
 * @Author: xinqiao lxq1990.0716@qq.com
 * @Date: 2024-03-08
 * @LastEditors: xinqiao lxq1990.0716@qq.com
 * @LastEditTime: 2024-03-14
 */
import request from '/@/api/request'

/** 获取部门列表 */
export const requestGetDeptList = (data: GetDeptListTypes.IRequest) => {
  return request.post<IBaseResponse<GetDeptListTypes.IResponse[]>>('/business/company/dept/getDeptList/V1', data)
}

/** 添加部门 */
export const requestSaveDept = (data: SaveDeptTypes.IRequest) => {
  return request.post<IBaseResponse<SaveDeptTypes.IResponse>>('/business/company/dept/saveDept/V1', data)
}

/** 编辑部门 */
export const requestUpdateDept = (data: UpdateDeptTypes.IRequest) => {
  return request.post<IBaseResponse<UpdateDeptTypes.IResponse>>('/business/company/dept/updateDept/V1', data)
}

/** 删除部门 */
export const requestDeleteDept = (data: DeleteDeptTypes.IRequest) => {
  return request.post<IBaseResponse<DeleteDeptTypes.IResponse>>('/business/company/dept/deleteDept/V1', data)
}

/** 查询部门人员列表 */
export const requestUserDeptList = (data: UserDeptListTypes.IRequest) => {
  return request.post<IPaginationResponse<UserDeptListTypes.IResponse[]>>('/business/company/dept/userDeptList/V1', data)
}

/** 获取部门人员关联的角色列表 */
export const requestGetDeptUserRoles = (data: GetDeptUserRolesTypes.IRequest) => {
  return request.post<IPaginationResponse<GetDeptUserRolesTypes.IResponse[]>>('/business/company/dept/getDeptUserRoles/V1', data)
}

/** 添加部门人员 */
export const requestSaveDeptUser = (data: SaveDeptUserTypes.IRequest) => {
  return request.post<IBaseResponse<SaveDeptUserTypes.IResponse>>('/business/company/dept/saveDeptUser/V1', data)
}

/** 修改部门人员信息 */
export const requestUpdateDeptUser = (data: UpdateDeptUserTypes.IRequest) => {
  return request.post<IBaseResponse<UpdateDeptUserTypes.IResponse>>('/business/company/dept/updateDeptUser/V1', data)
}

/** 查询公司人员列表（指定上级使用） */
export const requestUserCompanyList = (data: UserCompanyListTypes.IRequest) => {
  return request.post<IPaginationResponse<UserCompanyListTypes.IResponse[]>>('/business/company/dept/userCompanyList/V1', data)
}

/** 指定部门人员上级 */
export const requestAddUserLeader = (data: AddUserLeaderTypes.IRequest) => {
  return request.post<IBaseResponse<AddUserLeaderTypes.IResponse>>('/business/company/dept/addUserLeader/V1', data)
}

/** 指定部门负责人 */
export const requestAddDeptLeader = (data: AddDeptLeaderTypes.IRequest) => {
  return request.post<IBaseResponse<AddDeptLeaderTypes.IResponse>>('/business/company/dept/addDeptLeader/V1', data)
}
